/**
 * Copyright 2018 asiainfo Inc.
 **/
package com.myz.rabbitmq.common.config;


import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 将交换机和队列绑定
 *
 * @author maoyz on 2018/8/28
 * @version: v1.0
 */
@Configuration
public class RabbitConfig {

    @Bean
    public RabbitTemplate.ConfirmCallback confirmCallback() {
        return new RabbitMqConfirmAndReturn();
    }

    @Bean
    public RabbitTemplate.ReturnCallback returnCallback() {
        return new RabbitMqConfirmAndReturn();
    }

}
